package lab7.com.acme;

public class Test {
	public static void main(String[] args) {
		int v1 = 3;
		
		//byte v2 = v1; narrowing conversion
		byte v2 = (byte)v1;
		System.out.println(v2);
		v1 = 256;
		//byte v3 = v1; 256 is more then byte can contain
		int v3 = v1;
		System.out.println(v3);
		int v4 = 's';
		System.out.println(v4);
		
		//
		byte v5 = 115;
		if (v5 == 's') {
			System.out.println("Equals");
		}
		
		//What exactly will be printed? Ans: 4.00, because we cast to double
		System.out.println((double)4);
		
		//What exactly will be printed? 
		double d = 5;
		System.out.println(d + 1);
		
		//boolean b = v4; we can't cast to boolean
		boolean b = true;
		
		//short v6 = "short"; we can't cast String to short 
		String v6 = "short";
		
		//float v7 = 3.67; compiler think, that "3.67" is double, within "f" in the end
		float v7 = 3.67f;
		
		float v9 = 3;//Why there is no compilation error? Ans: it's widening conversion
		
		//int v8 = v7; narrowing conversion
		int v8 = (int)v7;
		
		//int array[] = new double["27"]; 1)can't covert double array to int array 2)length can't be specified by String
		
		double array[] = new double[27];
		
	}

}
